Events Maintenance Cmdlets
The following are lists of the commands to delete events from the database.
Arguments in bold are mandatory.
Invoke-AmcRemoveEventsFromDeploymentGroup
Removes all events from the specified deployment group.
Return value: Void
| Arguments | Argument Description |
|---|---|
| GroupName (String) | The name of the deployment group where the events are to be removed. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
| BatchDelay (Int) | Amount of time in seconds that SQL will pause to allow other transactions to process. |
Invoke-AmcRemoveEventsOlderThanXDays
Removes all events older than the specified number of days.
Return value: Void
| Arguments | Argument Description |
|---|---|
| Days (Int) | How many days worth of events to retain - any events older than this will be deleted. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
| BatchDelay (Int) | Amount of time in seconds that SQL will pause to allow other transactions to process. |
Invoke-AmcRemoveEventsWithId
Removes all events with the specified identifier.
Return value: Void
| Arguments | Argument Description |
|---|---|
| EventId (Int) | The event Id to be removed from the database. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
| BatchDelay (Int) | Amount of time in seconds that SQL will pause to allow other transactions to process. |
Invoke-AmcRemoveEventsWithinIdRange
Removes all events within the specified event id range.
Return value: Void
| Arguments | Argument Description |
|---|---|
| StartEventId (Int) | The start event Id range to be removed from the database. |
| EndEventId (Int) | The end event Id range to be removed from the database. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
| BatchDelay (Int) | Amount of time in seconds that SQL will pause to allow other transactions to process. |
Invoke-AmcRemoveHighVolumeEventsOlderThan
Removes all high volume events older than the specified number of days.
Return value: Void
| Arguments | Argument Description |
|---|---|
| Days (Int) | The maximum age of high volume events that should be retained. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
| BatchDelay (Int) | Amount of time in seconds that SQL will pause to allow other transactions to process. |
Test-AmcRemoveEventsFromDeploymentGroup
Provides a preview of expected results for removing all events from the specified deployment group (see Invoke-AmcRemoveAllEventsFromDeploymentGroup).
Return value: Void
|
Arguments |
Argument Description |
|---|---|
| GroupName (String) | The name of the deployment group where the events are to be removed. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
Test-AmcRemoveEventsOlderThanXDays
Provides a preview of expected results for removing all events older than the specified number of days (see Invoke-AmcRemoveAllEventsOlderThanXDays).
Return value: Void
|
Arguments |
Argument Description |
|---|---|
| Days (Int) | The maximum age of high volume events that should be retained. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
Test-AmcRemoveEventsWithId
Provides a preview of expected results for removing all event records that match the specified event ID (see Invoke-AmcRemoveAllEventsWithId).
Return value: Void
| Arguments | Argument Description |
|---|---|
| EventId (Int) | The event Id to be removed from the database. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
Test-AmcRemoveEventsWithIdRange
Provides a preview of expected results for removing all events within the specified event range (see Invoke-AmcRemoveAllEventsWithinIdRange).
Return value: Void
| Arguments | Argument Description |
|---|---|
| StartEventId (Int) | The start event Id range to be removed from the database. |
| EndEventId (Int) | The end event Id range to be removed from the database. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |
Test-AmcRemoveHighVolumeEventsOlderThan
Provides a preview of expected results for removing all high volume events older than the specified number of days (see Invoke-AmcRemoveAllHighVolumeEventsOlderThan).
Return value: Void
| Arguments | Argument Description |
|---|---|
| Days (Int) | The maximum age of high volume events that should be retained. |
| BatchSize (Int) | Number of rows to be affected within each batch transaction. |